<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-core</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
The timer binding in SwitchYard provides support for triggering services with fixed timer. It's lightweight alternative for Quartz Binding.
The file binding is built on top of camel-timer. Please refer camel documentation for detailed description of options.
This binding have it's own namespace. To use it you must declare namespace with uri urn:switchyard-component-camel-core:config:1.0. Your Maven project should also have following dependency:
<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-core</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
This binding do not depend on switchyard-component-camel and it might be used separately.
Following options can be apiled to <binding.timer> definition:
name : name of timer
time
pattern
period
delay
fixedRate
daemon
Here's an example of what a timer service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:service name="GreetingService" promote="GreetingService"> <camel:binding.timer> <camel:name>GreetingTimer</camel:name> <camel:time>2012-01-01T12:00:00</camel:time> <camel:pattern>yyyy-MM-dd'T'HH:mm:ss</camel:pattern> <camel:delay>1000</camel:delay> <camel:fixedRate>true</camel:fixedRate> </camel:binding.timer> </sca:service> </sca:composite>